﻿using System;
using System.Collections.Generic;
using System.Data;
using MedicService.Domain.Generic;

namespace MedicService.Server.Factory.Generic {
    public abstract class DirectoryFactory<TEntity> : DirectorySimpleFactory<TEntity> where TEntity : DirectorySimpleItem {

        protected DirectoryFactory(string tableName) : base(tableName) {}
        protected DirectoryFactory(string tableName, string orderBy) : base(tableName, orderBy) {}

        protected abstract override string GetInsertQuery(TEntity entity);

        protected abstract override string GetUpdateQuery(TEntity entity);

        protected abstract override void FillEntity(TEntity entity, DataRow myDataRow);

    }
}